// 商品类别信息
import { findCategory } from '@/api/main.js'
export default {
  namespaced: true,
  state () {
    return {
      categoryList: []
    }
  },
  mutations: {
    categoryList (state, list) {
      state.categoryList = list
    }
  },
  actions: {
    async setList (context) {
      const res = await findCategory()
      // console.log(res.result)
      context.commit('categoryList', res.result)
    }
  }
}
